<?php
$db['validwarranties'] = array(
      "columns"=>array(
            "warranty_id"=>array(
                   "type" => "number",
                   "required" => true,
                   "pkey" => true,
                   "extra" => "auto_increment",
                   "editable" => false,
                   "in_list" => false
                  ),
            "product_style"=>array(
                  "type" => "varchar(30)",
                  "label" => app::get( "yswarranty" )->_( "機種" ),
                  "width" => 150,
                  "searchtype" => "has",
                  "editable" => true,
                  'filtertype' => 'has',
                  'filterdefault' => true,
                  "in_list" => true,
                  "is_title" => true,
                  "default_in_list" => true
            ),
            "product_no"=>array(
                  "type" => "varchar(30)",
                  "label" => app::get( "yswarranty" )->_( "機號" ),
                  "width" => 150,
                  "searchtype" => "head",
                  "editable" => true,
                  "filtertype" => "yes",
                  "filterdefault" => true,
                  "in_list" => true,
                  "default_in_list" => true
            ),
            "warranty_no"=>array(
                  "type" => "varchar(20)",
                  "label" => app::get( "yswarranty" )->_( "保證書編號" ),
                  "width" => 200,
                  "editable" => true,
                  "filtertype" => "yes",
                  "required" => true,
                  "in_list" => true,
                  "is_title" => true,
                  "default_in_list" => true
            ),            
            "verify_code"=>array(
                  "type" => "varchar(20)",
                  "label" => app::get( "yswarranty" )->_( "保證書驗證碼" ),
                  "width" => 200,
                  "editable" => true,
                  "filtertype" => "yes",
                  "filterdefault" => "true",
                  "in_list" => true,
                  "is_title" => true,
                  "default_in_list" => true                  
                  
            ),
            "createat"=>array(
                  "type" => "time",
                  "label" => app::get( "yswarranty" )->_( "建檔時間" ),
                  "width" => 150,
                  "editable" => false,
                   "required" => true,
                  "filtertype" => "time",
                  "filterdefault" => true,
                  "in_list" => true,
                  "is_title" => true,                  
            ),
            "used"=>array(
                  "type" => "tinybool",
                  "default" => "N",
                  "label" => app::get( "yswarranty" )->_( "已被註冊" ),
                  "width" => 100,
                  "required" => true,
                  "editable" => true,
                  "filtertype" => "bool",
                  "filterdefault" => "false",         
                  "in_list" => true,
                  "is_title" => true,
            ),
            "valid"=>array(
                  "type" => "tinybool",
                  "default" => "Y",
                  "label" => app::get( "yswarranty" )->_( "是否有效" ),
                  "width" => 100,
                  "required" => true,
                  "editable" => true,
                  "in_list" => true,
                  "is_title" => true,
            )
      ),
      "engine" => "innodb",
);

?>